import request from '@/utils/request'
import type { LedgerData,ApiResponse } from '@/types/ledger'


export function fetchLedgerRecords(): Promise<LedgerData> {
  return request({
    url: '/Comprehensive/selectLedgerById/1',
    method: 'get'
  })
}

export function updateLedgerRecord(data: payload) {
  return request({
    url: '/Comprehensive/updateRecord',
    method: 'put',
    data
  })
}
export function fetchSingleLedgerRecord(recordId: number): Promise<LedgerData> {
  return request({
    url: `/Comprehensive/selectRecordById/${recordId}`,
    method: 'get'
  })
}




export function deleteLedgerRecord(recordId: number) {
  return request({
    url: `/Comprehensive/deleteRecord/${recordId}`,
    method: 'delete'
  })
}

